home *** CD-ROM | disk | FTP | other *** search
/ Crosscountry USA Photo Safari / Crosscountry USA Photo Safari.iso / Data / safari_usa / pak00_16bit_f.pk3 / country_map.gl.p < prev    next >
Text File  |  2003-01-17  |  33KB  |  1,127 lines

  1. {
  2.   
  3.   Hidden = TRUE;
  4.   ScriptID = script {    
  5.     @loaded {
  6.       ResByName("image/large_map_est.jpg");
  7.       ResByName("image/large_map_cst.jpg");
  8.       ResByName("image/large_map_mst.jpg");
  9.       ResByName("image/large_map_pst.jpg");
  10.       ResByName("image/large_map_ast.jpg");
  11.       ResByName("image/large_map_hst.jpg");
  12.       
  13.       ResByName("gui/laptop/map_button/small_check_off.pcx");
  14.       ResByName("gui/laptop/map_button/small_check_on_red.pcx");
  15.       ResByName("gui/laptop/map_button/small_checked_off.pcx");
  16.       ResByName("gui/laptop/map_button/small_checked_on_red.pcx");
  17.  
  18.       ResParseEvent(SELF, "@show");
  19.  
  20.       ResParseEvent(ResByName("country_map.gl/com1_button"), "@activate");
  21.     }
  22.     @show {
  23.       int i;
  24.       resid Player;
  25.       resid Commodity;
  26.       resid ComButton;
  27.       resid ComButtonOn;
  28.       resid ComButtonOff;
  29.       str   ComBonusName;
  30.  
  31.       Player = ResPropGetResID(ResByName("Game"), "game_cur_player");
  32.  
  33.       /* populate the commodity checkbox labels */
  34.       i = 1;
  35.       while (i <= ResPropGetInt(Player,"commodity_number_of")) {
  36.         Commodity    = ResPropGetResID(Player, StrFormatStr("commodity_%d", i));
  37.         ComButton    = GuiChildByName(SELF,StrFormatStr("com%d_button", i));
  38.         ComButtonOn  = GuiChildByname(ComButton,"on");
  39.         ComButtonOff = GuiChildByname(ComButton,"off");
  40.  
  41.         ResPropSetStr(GuiChildByName(SELF,StrFormatStr("com%d_label",i)),"InputText", ResPropGetStr(Commodity,"commodity_name"));
  42.  
  43.         if (ResPropGetInt(Commodity, "commodity_state")) {
  44.           ResPropSetResID(ComButtonOn, "UpID", ResByName("gui/laptop/map_button/small_checked_on_red.pcx"));
  45.           ResPropSetResID(ComButtonOff,"UpID", ResByName("gui/laptop/map_button/small_checked_off.pcx"));
  46.         } else {
  47.           ResPropSetResID(ComButtonOn, "UpID", ResByName("gui/laptop/map_button/small_check_on_red.pcx"));
  48.           ResPropSetResID(ComButtonOff,"UpID", ResByName("gui/laptop/map_button/small_check_off.pcx"));
  49.         }
  50.  
  51.         ResPropSetInt(ComButton, "Hidden", FALSE);
  52.  
  53.         i+=1; 
  54.       }
  55.       Commodity = ResPropGetResID(Player, "commodity_bonus");
  56.       ComBonusName = ResPropGetStr(Commodity,"commodity_name");
  57.       if (!StrExact("",ComBonusName)) {
  58.         ComButton    = GuiChildByName(SELF,StrFormatStr("com%d_button", i));
  59.         ComButtonOn  = GuiChildByname(ComButton,"on");
  60.         ComButtonOff = GuiChildByname(ComButton,"off");
  61.  
  62.         ResPropSetStr(GuiChildByName(SELF,StrFormatStr("com%d_label",i)),"InputText", ComBonusName);
  63.  
  64.         if (ResPropGetInt(Commodity, "commodity_state")) {
  65.           ResPropSetResID(ComButtonOn, "UpID", ResByName("gui/laptop/map_button/small_checked_on_red.pcx"));
  66.           ResPropSetResID(ComButtonOff,"UpID", ResByName("gui/laptop/map_button/small_checked_off.pcx"));
  67.         } else {
  68.           ResPropSetResID(ComButtonOn, "UpID", ResByName("gui/laptop/map_button/small_check_on_red.pcx"));
  69.           ResPropSetResID(ComButtonOff,"UpID", ResByName("gui/laptop/map_button/small_check_off.pcx"));
  70.         }
  71.  
  72.         ResPropSetInt(ComButton, "Hidden", FALSE);
  73.         i+=1;
  74.       }
  75.       while (i<=13) {
  76.         ResPropSetStr(GuiChildByName(SELF,StrFormatStr("com%d_label",i)),"InputText", "");
  77.         ResPropSetInt(GuiChildByName(SELF,StrFormatStr("com%d_button",i)), "Hidden", TRUE);
  78.         i+=1; 
  79.       }
  80.  
  81.       ResParseEvent(ResPropGetResID(GuiChildByName(SELF, "com1_button"), "RadioGroupSelectedID"), "@activate");
  82.     }
  83.   };
  84.  
  85.   ChildID = {
  86.     
  87.     GuiAnimation("plate") {
  88.       AnimationID = "image/country_map.pcx";
  89.       X = 0;
  90.       Y = 0;
  91.     },
  92.  
  93.     GuiTilemap("map") {
  94.       X = 23;
  95.       Y = 64;
  96.       Width = 596;
  97.       Height = 246;
  98.       ScrollX = 0;
  99.       ScrollY = 0;
  100.  
  101.       TileMapID = TileMap {
  102.         TileCountX = 1;
  103.         TileCountY = 1;
  104.         TileSet = {
  105.           "image/large_map.jpg",
  106.           "image/large_map_cst.jpg",
  107.           "image/large_map_est.jpg",
  108.           "image/large_map_mst.jpg",
  109.           "image/large_map_pst.jpg",
  110.           "image/large_map_ast.jpg",
  111.           "image/large_map_hst.jpg"
  112.         };
  113.         TileArray = {
  114.           0
  115.         };
  116.       };
  117.  
  118.     },
  119.  
  120.    
  121.     GuiCommodityViewer("commodity_drawer") {
  122.       ScriptID = script {
  123.         @setup {
  124.           ResByName("gui/laptop/map_button/red_dot.pcx");
  125.           ResByName("gui/laptop/map_button/blue_dot.pcx");
  126.         }
  127.         @loaded {
  128.           resid city_data_id;
  129.           resid tmp_id;
  130.           int   city_num;
  131.           int   row_count;
  132.           str   cur_name;
  133.           int   x;
  134.           int   y;
  135.           int   xScaleNumerator;
  136.           int   xScaleDenominator;
  137.           int   yScaleNumerator;
  138.           int   yScaleDenominator;
  139.           int   xOffset;
  140.           int   yOffset;
  141.           resid mapID;
  142.           resid tileMapID;
  143.           resid countryTileMapID;
  144.           str   cur_commodity;
  145.           str   last_commodity;
  146.           str   city_name;
  147.           int   text_x;
  148.           int   text_y;
  149.           resid cv_actor_script_id;
  150.  
  151.           ResPropAlias(SELF, "cur_commodity", "cur_commodity");
  152.           ResPropAlias(SELF, "last_commodity", "last_commodity");
  153.  
  154.           cur_commodity =
  155.             ResPropGetStr( 
  156.               ResPropGetResID(
  157.                 ResPropGetResID(
  158.                   ResByName("Game"),
  159.                   "player_1_id"
  160.                 ),
  161.                 "commodity_bonus"
  162.               ),
  163.               "commodity_name"
  164.             );
  165.  
  166.           last_commodity = "";
  167.  
  168.           city_data_id      = ResPropGetResID(ResByName("CSVData"), "city_id");
  169.           row_count         = CSVGetRowCount(city_data_id);
  170.           mapID             = GuiSiblingByName("map");
  171.           xScaleNumerator   = ResPropGetInt(mapID, "Width");
  172.           yScaleNumerator   = ResPropGetInt(mapID, "Height");
  173.           tileMapID         = ResPropGetResID(ResByName("map.gl/map"), "TileMapID");
  174.           xScaleDenominator = ResPropGetInt(tileMapID, "MapWidth");
  175.           yScaleDenominator = ResPropGetInt(tileMapID, "MapHeight");
  176.           xOffset           = -3;
  177.           yOffset           = -3;
  178.  
  179.           countryTileMapID = ResPropGetResID(GuiSiblingByName("map"), "TileMapID");
  180.           cv_actor_script_id = ResByName("commodity_viewer_actor.c4");
  181.  
  182.           city_num = 0;
  183.           while( city_num < row_count ) {
  184.  
  185.             cur_name = StrFormatStr("commodity_drawer_actor_%d",city_num);
  186.             tmp_id = ResCreateWithPropFile("GuiCommodityViewerActor",cur_name,"commodity_viewer_actor.ac.p");
  187.             ResPropSetResID(tmp_id, "ScriptID", cv_actor_script_id);
  188.             ActorAddToTileMap(tmp_id, countryTileMapID);
  189.  
  190.             x = CSVGetInt(city_data_id, "X", city_num);
  191.             y = CSVGetInt(city_data_id, "Y", city_num);
  192.  
  193.             x *= xScaleNumerator;
  194.             x /= xScaleDenominator;
  195.             x += xOffset;
  196.  
  197.             y *= yScaleNumerator;
  198.             y /= yScaleDenominator;
  199.             y += yOffset;
  200.                         
  201.             
  202.             /* draw the commodity dot */
  203.             ActorSetMXMY(tmp_id, x * 1000, y * 1000);
  204.             ResPropSetInt(tmp_id, "ZOrder", 1);
  205.  
  206.             text_x = CSVGetInt(city_data_id, "text_x", city_num)+3;
  207.             text_y = CSVGetInt(city_data_id, "text_y", city_num)+3;
  208.            
  209.             city_name = CSVGetStr(city_data_id, "name", city_num);
  210.  
  211.             if (
  212.               StrExact(
  213.                 city_name,
  214.                 ResPropGetStr(
  215.                   ResPropGetResID(
  216.                     ResByName("Player1"),
  217.                     "scenario_id"
  218.                   ),
  219.                   "scenario_end_city"
  220.                 )
  221.               )
  222.             ) {
  223.               ResPropSetInt(tmp_id, "is_player1_dest", 1);
  224.               ResPropSetInt(tmp_id, "ZOrder", 0);
  225.             }
  226.  
  227.             if (
  228.               StrExact(
  229.                 city_name,
  230.                 ResPropGetStr(
  231.                   ResPropGetResID(
  232.                     ResByName("Player2"),
  233.                     "scenario_id"
  234.                   ),
  235.                   "scenario_end_city"
  236.                 )
  237.               )
  238.             ) {
  239.               ResPropSetInt(tmp_id, "is_player2_dest", 1);
  240.               ResPropSetInt(tmp_id, "ZOrder", 0);
  241.             }
  242.  
  243.             if (StrExact(CSVGetStr(city_data_id, "text_align", city_num), "R")) {
  244.               text_x -= TextfontGetWidth(ResByName("font/verdana_9_black.tf"), city_name);
  245.             }
  246.  
  247.             ResPropSetStr(tmp_id,"com1",       CSVGetStr(city_data_id, "com1",   city_num));
  248.             ResPropSetStr(tmp_id,"com2",       CSVGetStr(city_data_id, "com2",   city_num));
  249.             ResPropSetStr(tmp_id,"com3",       CSVGetStr(city_data_id, "com3",   city_num));
  250.             ResPropSetStr(tmp_id,"city_name",  city_name);
  251.             ResPropSetInt(tmp_id,"city_text_x",text_x); 
  252.             ResPropSetInt(tmp_id,"city_text_y",text_y); 
  253.             
  254.             city_num += 1;
  255.           }
  256.           ActorBroadcastEvent(
  257.             ResPropGetResID(
  258.               GuiSiblingByName("map"),
  259.               "TileMapID"
  260.             ),
  261.             "@updateCommodity"
  262.           );
  263.            
  264.           tmp_id = ResCreateWithPropFile("GuiCommodityViewerTruckActor", "commodity_drawer_truck_actor", "commodity_viewer_truck.ac.p");
  265.           ActorAddToTileMap(tmp_id, countryTileMapID);
  266.           ResPropSetInt(tmp_id, "x_scale_numerator",   xScaleNumerator);
  267.           ResPropSetInt(tmp_id, "x_scale_denominator", xScaleDenominator);
  268.           ResPropSetInt(tmp_id, "x_offset",            xOffset);
  269.           ResPropSetInt(tmp_id, "y_scale_numerator",   yScaleNumerator);
  270.           ResPropSetInt(tmp_id, "y_scale_denominator", yScaleDenominator);
  271.           ResPropSetInt(tmp_id, "y_offset",            yOffset);
  272.           ResPropSetInt(tmp_id, "ZOrder",              2);
  273.           ResParseEvent(tmp_id, "@updateTruck");  
  274.          
  275.         }
  276.         @show {
  277.           ResParseEvent(ResByName("commodity_drawer_truck_actor"), "@updateTruck");
  278.         }
  279.         @animate {
  280.           str cur_commodity;
  281.           str last_commodity;
  282.           ResPropAlias(SELF, "cur_commodity", "cur_commodity");
  283.           ResPropAlias(SELF, "last_commodity", "last_commodity");
  284.  
  285.           if (StrExact(cur_commodity,last_commodity)) {
  286.             stop;
  287.           } else {
  288.             last_commodity = cur_commodity;
  289.             ActorBroadcastEvent(
  290.               ResPropGetResID(
  291.                 GuiSiblingByName("map"),
  292.                 "TileMapID"
  293.               ),
  294.               "@updateCommodity"
  295.             );
  296.           }
  297.         }
  298.       };
  299.     },    
  300.  
  301.     GuiLayer("legend") {
  302.     X = 40;
  303.     Y = 265;
  304.     ChildID = {
  305.         GuiAnimation("green_dot") {
  306.           AnimationID = "gui/laptop/map_button/yellow_dot.pcx";
  307.           X = 0;
  308.           Y = 0;        
  309.         },
  310.         GuiTextInput("truck_text") {
  311.           X = 10;
  312.           Y = -6;  
  313.           Width = 70;
  314.           Height = 20;
  315.           FontID = "font/verdana_9_black.tf";
  316.           InputDisabled = TRUE;    
  317.           InputText = Mangle(65611/*"Truck"*/);
  318.         },
  319.         GuiAnimation("red_dot") {
  320.           AnimationID = "gui/laptop/map_button/red_dot.pcx";
  321.           X = 0;
  322.           Y = 15;        
  323.         },
  324.         GuiTextInput("commodity_text") {
  325.           X = 10;
  326.           Y = 9; 
  327.           Width = 70;
  328.           Height = 20;
  329.           FontID = "font/verdana_9_black.tf";
  330.           InputDisabled = TRUE;    
  331.           InputText = Mangle(65612/*"Commodity"*/);
  332.         },
  333.         GuiAnimation("blue_dot") {
  334.           AnimationID = "gui/laptop/map_button/big_blue_dot.pcx";
  335.           X = 0;
  336.           Y = 30;        
  337.         },
  338.         GuiTextInput("destination_text") {
  339.           X = 10;
  340.           Y = 24;  
  341.           Width = 70;
  342.           Height = 20;
  343.           FontID = "font/verdana_9_black.tf";
  344.           InputDisabled = TRUE;    
  345.           InputText = Mangle(65613/*"Destination"*/);
  346.         }
  347.       };
  348.     },
  349.  
  350.     GuiTextInput("screen_name") {
  351.       X = 40;
  352.       Y = 40;
  353.       Width = 70;
  354.       Height = 20;
  355.       FontID = "font/verdana_9.tf";
  356.       InputDisabled = TRUE;    
  357.       InputText = Mangle(65614/*"Country Map"*/);
  358.     },
  359.  
  360.     GuiButtonGroup("no_timezone_button") {
  361.       X = 390;
  362.       Y = 315;
  363.       RadioGroupID = 2;
  364.       ScriptID = script {
  365.         @activate {
  366.           TileMapSetTile(
  367.             ResPropGetResID(GuiSiblingByName("map"), "TileMapID"),
  368.             0,0,
  369.             0
  370.             );
  371.           /*
  372.            ResPropSetResID(
  373.             GuiSiblingByName("map"),
  374.             "AnimationID",
  375.             ResByName("image/large_map.jpg")
  376.           );
  377.           */
  378.         }
  379.       };   
  380.       ChildID = {
  381.         GuiButton("no_timezone_button_off") {
  382.           X = 0;
  383.           Y = 0;
  384.           HorizontalAlign = RIGHTOF;
  385.           HorizontalPadding = 6;
  386.           TextID = Mangle(65615/*"No Time Zone"*/);
  387.           FontID = "font/verdana_black_bold_12.tf";  
  388.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  389.         },  
  390.         GuiButton("no_timezone_button_on") {
  391.           X = 0;
  392.           Y = 0;
  393.           HorizontalAlign = RIGHTOF;
  394.           HorizontalPadding = 6;       
  395.            TextID = Mangle(65616/*"No Time Zone"*/);
  396.           FontID = "font/verdana_black_bold_12.tf";   
  397.           UpID = "gui/laptop/map_button/small_check_on.pcx";
  398.         }
  399.       };
  400.     },
  401.  
  402.     
  403.  
  404.     GuiButtonGroup("est_button") {
  405.       X = 390;
  406.       Y = 335;
  407.       RadioGroupID = 2;
  408.       ScriptID = script {
  409.         @activate {
  410.           TileMapSetTile(
  411.             ResPropGetResID(GuiSiblingByName("map"), "TileMapID"),
  412.             0,0,
  413.             2
  414.           );
  415.           /*
  416.           ResPropSetResID(
  417.             GuiSiblingByName("map"),
  418.             "AnimationID",
  419.             ResByName("image/large_map_est.pcx")
  420.           );
  421.           */
  422.         }
  423.       };   
  424.       ChildID = {
  425.         GuiButton("est_button_off") {
  426.           X = 0;
  427.           Y = 0;
  428.           HorizontalAlign = RIGHTOF;
  429.           HorizontalPadding = 6;
  430.           TextID = Mangle(65617/*"Eastern Time"*/);
  431.           FontID = "font/verdana_black_bold_12.tf";  
  432.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  433.         },  
  434.         GuiButton("est_button_on") {
  435.           X = 0;
  436.           Y = 0;
  437.           HorizontalAlign = RIGHTOF;
  438.           HorizontalPadding = 6;       
  439.            TextID = Mangle(65618/*"Eastern Time"*/);
  440.           FontID = "font/verdana_black_bold_12.tf";   
  441.           UpID = "gui/laptop/map_button/small_check_on.pcx";
  442.         }
  443.       };
  444.     },
  445.  
  446.     GuiButtonGroup("cst_button") {
  447.       X = 390;
  448.       Y = 355;
  449.       RadioGroupID = 2;
  450.       ScriptID = script {
  451.         @activate {
  452.           TileMapSetTile(
  453.             ResPropGetResID(GuiSiblingByName("map"), "TileMapID"),
  454.             0,0,
  455.             1
  456.           );
  457.           /*
  458.            ResPropSetResID(
  459.             GuiSiblingByName("map"),
  460.             "AnimationID",
  461.             ResByName("image/large_map_cst.pcx")
  462.           );
  463.           */
  464.          }
  465.       };   
  466.       ChildID = {
  467.         GuiButton("cst_button_off") {
  468.           X = 0;
  469.           Y = 0;
  470.           HorizontalAlign = RIGHTOF;
  471.           HorizontalPadding = 6;
  472.           TextID = Mangle(65619/*"Central Time"*/);
  473.           FontID = "font/verdana_black_bold_12.tf";  
  474.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  475.         },  
  476.         GuiButton("cst_button_on") {
  477.           X = 0;
  478.           Y = 0;
  479.           HorizontalAlign = RIGHTOF;
  480.           HorizontalPadding = 6;
  481.           TextID = Mangle(65620/*"Central Time"*/);
  482.           FontID = "font/verdana_black_bold_12.tf";  
  483.           UpID = "gui/laptop/map_button/small_check_on.pcx";
  484.         }
  485.       };
  486.     },
  487.  
  488.     GuiButtonGroup("mst_button") {
  489.       X = 390;
  490.       Y = 375;
  491.       RadioGroupID = 2;
  492.       ScriptID = script {
  493.         @activate {
  494.           TileMapSetTile(
  495.             ResPropGetResID(GuiSiblingByName("map"), "TileMapID"),
  496.             0,0,
  497.             3
  498.           );
  499.           /*
  500.            ResPropSetResID(
  501.             GuiSiblingByName("map"),
  502.             "AnimationID",
  503.             ResByName("image/large_map_mst.pcx")
  504.           );
  505.           */
  506.         }
  507.       };   
  508.       ChildID = {
  509.         GuiButton("mst_button_off") {
  510.           X = 0;
  511.           Y = 0;
  512.           HorizontalAlign = RIGHTOF;
  513.           HorizontalPadding = 6;
  514.           TextID = Mangle(65621/*"Mountain Time"*/);
  515.           FontID = "font/verdana_black_bold_12.tf";  
  516.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  517.         },  
  518.         GuiButton("mst_button_on") {
  519.           X = 0;
  520.           Y = 0;
  521.           HorizontalAlign = RIGHTOF;
  522.           HorizontalPadding = 6;
  523.           TextID = Mangle(65622/*"Mountain Time"*/);
  524.           FontID = "font/verdana_black_bold_12.tf";  
  525.           UpID = "gui/laptop/map_button/small_check_on.pcx";
  526.         }
  527.       };
  528.     },
  529.  
  530.     GuiButtonGroup("pst_button") {
  531.       X = 390;
  532.       Y = 395;
  533.       RadioGroupID = 2;
  534.       ScriptID = script {
  535.         @activate {
  536.           TileMapSetTile(
  537.             ResPropGetResID(GuiSiblingByName("map"), "TileMapID"),
  538.             0,0,
  539.             4
  540.           );
  541.           /*
  542.            ResPropSetResID(
  543.             GuiSiblingByName("map"),
  544.             "AnimationID",
  545.             ResByName("image/large_map_pst.pcx")
  546.           );
  547.           */
  548.         }
  549.       };   
  550.       ChildID = {
  551.         GuiButton("pst_button_off") {
  552.           X = 0;
  553.           Y = 0;
  554.           HorizontalAlign = RIGHTOF;
  555.           HorizontalPadding = 6;
  556.           TextID = Mangle(65623/*"Pacific Time"*/);
  557.           FontID = "font/verdana_black_bold_12.tf";  
  558.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  559.         },  
  560.         GuiButton("pst_button_on") {
  561.           X = 0;
  562.           Y = 0;
  563.           HorizontalAlign = RIGHTOF;
  564.           HorizontalPadding = 6;
  565.           TextID = Mangle(65624/*"Pacific Time"*/);
  566.           FontID = "font/verdana_black_bold_12.tf";  
  567.           UpID = "gui/laptop/map_button/small_check_on.pcx";
  568.         }
  569.       };
  570.     },
  571.  
  572.     GuiButtonGroup("ast_button") {
  573.       X = 390;
  574.       Y = 415;
  575.       RadioGroupID = 2;
  576.       ScriptID = script {
  577.         @activate {
  578.           TileMapSetTile(
  579.             ResPropGetResID(GuiSiblingByName("map"), "TileMapID"),
  580.             0,0,
  581.             5
  582.           );         
  583.         }
  584.       };   
  585.       ChildID = {
  586.         GuiButton("ast_button_off") {
  587.           X = 0;
  588.           Y = 0;
  589.           HorizontalAlign = RIGHTOF;
  590.           HorizontalPadding = 6;
  591.           TextID = Mangle(65625/*"Alaska Time"*/);
  592.           FontID = "font/verdana_black_bold_12.tf";  
  593.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  594.         },  
  595.         GuiButton("ast_button_on") {
  596.           X = 0;
  597.           Y = 0;
  598.           HorizontalAlign = RIGHTOF;
  599.           HorizontalPadding = 6;
  600.           TextID = Mangle(65626/*"Alaska Time"*/);
  601.           FontID = "font/verdana_black_bold_12.tf";  
  602.           UpID = "gui/laptop/map_button/small_check_on.pcx";
  603.         }
  604.       };
  605.     },
  606.  
  607.     GuiButtonGroup("hst_button") {
  608.       X = 390;
  609.       Y = 435;
  610.       RadioGroupID = 2;
  611.       ScriptID = script {
  612.         @activate {
  613.           TileMapSetTile(
  614.             ResPropGetResID(GuiSiblingByName("map"), "TileMapID"),
  615.             0,0,
  616.             6
  617.           );
  618.         }
  619.       };   
  620.       ChildID = {
  621.         GuiButton("hst_button_off") {
  622.           X = 0;
  623.           Y = 0;
  624.           HorizontalAlign = RIGHTOF;
  625.           HorizontalPadding = 6;
  626.           TextID = Mangle(65627/*"Hawaii Time"*/);
  627.           FontID = "font/verdana_black_bold_12.tf";  
  628.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  629.         },  
  630.         GuiButton("hst_button_on") {
  631.           X = 0;
  632.           Y = 0;
  633.           HorizontalAlign = RIGHTOF;
  634.           HorizontalPadding = 6;
  635.           TextID = Mangle(65628/*"Hawaii Time"*/);
  636.           FontID = "font/verdana_black_bold_12.tf";  
  637.           UpID = "gui/laptop/map_button/small_check_on.pcx";
  638.         }
  639.       };
  640.     },
  641.  
  642.  
  643.     GuiButtonGroup("com1_button") {
  644.       X = 40;
  645.       Y = 315;
  646.       RadioGroupID = 1;
  647.       ScriptID = script {
  648.         @activate {
  649.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com1_label"),"InputText"));
  650.         }
  651.       };
  652.       ChildID = {
  653.         GuiButton("off") {
  654.           X = 0;
  655.           Y = 0;
  656.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  657.         },  
  658.         GuiButton("on") {
  659.           X = 0;
  660.           Y = 0;
  661.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  662.         }
  663.       };
  664.     },
  665.      
  666.     GuiTextInput("com1_label") {
  667.       X = 60;
  668.       Y = 315;
  669.       Width = 95;
  670.       Height = 20;
  671.       InputDisabled = TRUE;
  672.       InputVerticalPadding = 0;
  673.       InputHorizontalPadding = 0;
  674.       InputTextHeightAdjust = 0;
  675.       InputTextWidthAdjust = 0;
  676.       FontID = "font/verdana_black_bold_12.tf";
  677.     },
  678.     
  679.     GuiButtonGroup("com2_button") {
  680.       X = 40;
  681.       Y = 335;
  682.       RadioGroupID = 1;
  683.       Hidden = TRUE;  
  684.       ScriptID = script {
  685.         @activate {
  686.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com2_label"),"InputText"));
  687.         }
  688.       };       
  689.       ChildID = {
  690.         GuiButton("off") {
  691.           X = 0;
  692.           Y = 0;
  693.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  694.         },  
  695.         GuiButton("on") {
  696.           X = 0;
  697.           Y = 0;
  698.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  699.         }
  700.       };
  701.     },
  702.      
  703.     GuiTextInput("com2_label") {
  704.       X = 60;
  705.       Y = 335;
  706.       Width = 95;
  707.       Height = 20;
  708.       InputDisabled = TRUE;  
  709.       InputVerticalPadding = 0;
  710.       InputHorizontalPadding = 0;
  711.       InputTextHeightAdjust = 0;
  712.       InputTextWidthAdjust = 0;
  713.       FontID = "font/verdana_black_bold_12.tf";
  714.       
  715.     },   
  716.  
  717.     GuiButtonGroup("com3_button") {
  718.       X = 40;
  719.       Y = 355;
  720.       RadioGroupID = 1;
  721.       Hidden = TRUE;
  722.       ScriptID = script {
  723.         @activate {
  724.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com3_label"),"InputText"));
  725.         }
  726.       };       
  727.       ChildID = {
  728.         GuiButton("off") {
  729.           X = 0;
  730.           Y = 0;
  731.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  732.         },  
  733.         GuiButton("on") {
  734.           X = 0;
  735.           Y = 0;
  736.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  737.         }
  738.       };
  739.     },
  740.      
  741.     GuiTextInput("com3_label") {
  742.       X = 60;
  743.       Y = 355;
  744.       Width = 95;
  745.       Height = 20;
  746.       InputDisabled = TRUE;  
  747.       InputVerticalPadding = 0;
  748.       InputHorizontalPadding = 0;
  749.       InputTextHeightAdjust = 0;
  750.       InputTextWidthAdjust = 0;
  751.       FontID = "font/verdana_black_bold_12.tf";
  752.       
  753.     },  
  754.       
  755.     GuiButtonGroup("com4_button") {
  756.       X = 40;
  757.       Y = 375;
  758.       RadioGroupID = 1;
  759.       Hidden = TRUE;
  760.       ScriptID = script {
  761.         @activate {
  762.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com4_label"),"InputText"));
  763.         }
  764.       };       
  765.       ChildID = {
  766.         GuiButton("off") {
  767.           X = 0;
  768.           Y = 0;
  769.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  770.         },  
  771.         GuiButton("on") {
  772.           X = 0;
  773.           Y = 0;
  774.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  775.         }
  776.       };
  777.     },
  778.      
  779.     GuiTextInput("com4_label") {
  780.       X = 60;
  781.       Y = 375;
  782.       Width = 95;
  783.       Height = 20;
  784.       InputDisabled = TRUE;  
  785.       InputVerticalPadding = 0;
  786.       InputHorizontalPadding = 0;
  787.       InputTextHeightAdjust = 0;
  788.       InputTextWidthAdjust = 0;
  789.       FontID = "font/verdana_black_bold_12.tf";
  790.       
  791.     },
  792.     
  793.     GuiButtonGroup("com5_button") {
  794.       X = 40;
  795.       Y = 395;
  796.       RadioGroupID = 1;
  797.       Hidden = TRUE;
  798.       ScriptID = script {
  799.         @activate {
  800.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com5_label"),"InputText"));
  801.         }
  802.       };         
  803.       ChildID = {
  804.         GuiButton("off") {
  805.           X = 0;
  806.           Y = 0;
  807.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  808.         },  
  809.         GuiButton("on") {
  810.           X = 0;
  811.           Y = 0;
  812.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  813.         }
  814.       };
  815.     },
  816.      
  817.     GuiTextInput("com5_label") {
  818.       X = 60;
  819.       Y = 395;
  820.       Width = 95;
  821.       Height = 20;
  822.       InputDisabled = TRUE;  
  823.       InputVerticalPadding = 0;
  824.       InputHorizontalPadding = 0;
  825.       InputTextHeightAdjust = 0;
  826.       InputTextWidthAdjust = 0;
  827.       FontID = "font/verdana_black_bold_12.tf";
  828.       
  829.     },  
  830.           
  831.     GuiButtonGroup("com6_button") {
  832.       X = 40;
  833.       Y = 415;
  834.       RadioGroupID = 1;
  835.       Hidden = TRUE;
  836.       ScriptID = script {
  837.         @activate {
  838.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com6_label"),"InputText"));
  839.         }
  840.       };         
  841.       ChildID = {
  842.         GuiButton("off") {
  843.           X = 0;
  844.           Y = 0;
  845.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  846.         },  
  847.         GuiButton("on") {
  848.           X = 0;
  849.           Y = 0;
  850.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  851.         }
  852.       };
  853.     },
  854.      
  855.     GuiTextInput("com6_label") {
  856.       X = 60;
  857.       Y = 415;
  858.       Width = 95;
  859.       Height = 20;
  860.       InputDisabled = TRUE;  
  861.       InputVerticalPadding = 0;
  862.       InputHorizontalPadding = 0;
  863.       InputTextHeightAdjust = 0;
  864.       InputTextWidthAdjust = 0;
  865.       FontID = "font/verdana_black_bold_12.tf";
  866.       
  867.     },
  868.     GuiButtonGroup("com7_button") {
  869.       X = 40;
  870.       Y = 435;
  871.       RadioGroupID = 1;
  872.       Hidden = TRUE;
  873.       ScriptID = script {
  874.         @activate {
  875.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com7_label"),"InputText"));
  876.         }
  877.       };   
  878.       ChildID = {
  879.         GuiButton("off") {
  880.           X = 0;
  881.           Y = 0;
  882.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  883.         },  
  884.         GuiButton("on") {
  885.           X = 0;
  886.           Y = 0;
  887.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  888.         }
  889.       };
  890.     },
  891.      
  892.     GuiTextInput("com7_label") {
  893.       X = 60;
  894.       Y = 435;
  895.       Width = 95;
  896.       Height = 20;
  897.       InputDisabled = TRUE;  
  898.       InputVerticalPadding = 0;
  899.       InputHorizontalPadding = 0;
  900.       InputTextHeightAdjust = 0;
  901.       InputTextWidthAdjust = 0;
  902.       FontID = "font/verdana_black_bold_12.tf";
  903.     },
  904.     GuiButtonGroup("com8_button") {
  905.       X = 160;
  906.       Y = 315;  
  907.       RadioGroupID = 1;
  908.       Hidden = TRUE;
  909.       ScriptID = script {
  910.         @activate {
  911.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com8_label"),"InputText"));
  912.         }
  913.       };             
  914.       ChildID = {
  915.         GuiButton("off") {
  916.           X = 0;
  917.           Y = 0;
  918.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  919.         },
  920.         GuiButton("on") {
  921.           X = 0;
  922.           Y = 0;
  923.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  924.         }
  925.       };
  926.     },
  927.      
  928.     GuiTextInput("com8_label") {
  929.       X = 180;
  930.       Y = 315;
  931.       Width = 160;
  932.       Height = 20;
  933.       InputDisabled = TRUE;  
  934.       InputVerticalPadding = 0;
  935.       InputHorizontalPadding = 0;
  936.       InputTextHeightAdjust = 0;
  937.       InputTextWidthAdjust = 0;
  938.       FontID = "font/verdana_black_bold_12.tf";
  939.     },
  940.  
  941.     GuiButtonGroup("com9_button") {
  942.       X = 160;
  943.       Y = 335;  
  944.       RadioGroupID = 1;
  945.       Hidden = TRUE;       
  946.       ScriptID = script {
  947.         @activate {
  948.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com9_label"),"InputText"));
  949.         }
  950.       };          
  951.       ChildID = {
  952.         GuiButton("off") {
  953.           X = 0;
  954.           Y = 0;
  955.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  956.         },  
  957.         GuiButton("on") {
  958.           X = 0;
  959.           Y = 0;
  960.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  961.         }
  962.       };
  963.     },
  964.      
  965.     GuiTextInput("com9_label") {
  966.       X = 180;
  967.       Y = 335;
  968.       Width = 160;
  969.       Height = 20;
  970.       InputDisabled = TRUE;  
  971.       InputVerticalPadding = 0;
  972.       InputHorizontalPadding = 0;
  973.       InputTextHeightAdjust = 0;
  974.       InputTextWidthAdjust = 0;
  975.       FontID = "font/verdana_black_bold_12.tf";
  976.     },   
  977.  
  978.     GuiButtonGroup("com10_button") {
  979.       X = 160;
  980.       Y = 355;  
  981.       RadioGroupID = 1;
  982.       Hidden = TRUE;     
  983.       ScriptID = script {
  984.         @activate {
  985.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com10_label"),"InputText"));
  986.         }
  987.       };            
  988.       ChildID = {
  989.         GuiButton("off") {
  990.           X = 0;
  991.           Y = 0;
  992.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  993.         },  
  994.         GuiButton("on") {
  995.           X = 0;
  996.           Y = 0;
  997.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  998.         }
  999.       };
  1000.     },
  1001.      
  1002.     GuiTextInput("com10_label") {
  1003.       X = 180;
  1004.       Y = 355;
  1005.       Width = 160;
  1006.       Height = 20;
  1007.       InputDisabled = TRUE;  
  1008.       InputVerticalPadding = 0;
  1009.       InputHorizontalPadding = 0;
  1010.       InputTextHeightAdjust = 0;
  1011.       InputTextWidthAdjust = 0;
  1012.       FontID = "font/verdana_black_bold_12.tf";
  1013.     },  
  1014.       
  1015.     GuiButtonGroup("com11_button") {
  1016.       X = 160;
  1017.       Y = 375;
  1018.       RadioGroupID = 1;
  1019.       Hidden = TRUE;  
  1020.       ScriptID = script {
  1021.         @activate {
  1022.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com11_label"),"InputText"));
  1023.         }
  1024.       };             
  1025.       ChildID = {
  1026.         GuiButton("off") {
  1027.           X = 0;
  1028.           Y = 0;
  1029.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  1030.         },  
  1031.         GuiButton("on") {
  1032.           X = 0;
  1033.           Y = 0;
  1034.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  1035.         }
  1036.       };
  1037.     },
  1038.      
  1039.     GuiTextInput("com11_label") {
  1040.       X = 180;
  1041.       Y = 375;
  1042.       Width = 160;
  1043.       Height = 20;
  1044.       InputDisabled = TRUE;  
  1045.       InputVerticalPadding = 0;
  1046.       InputHorizontalPadding = 0;
  1047.       InputTextHeightAdjust = 0;
  1048.       InputTextWidthAdjust = 0;
  1049.       FontID = "font/verdana_black_bold_12.tf";
  1050.     },
  1051.     
  1052.     GuiButtonGroup("com12_button") {
  1053.       X = 160;
  1054.       Y = 395;  
  1055.       RadioGroupID = 1;
  1056.       Hidden = TRUE;     
  1057.       ScriptID = script {
  1058.         @activate {
  1059.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com12_label"),"InputText"));
  1060.         }
  1061.       };          
  1062.       ChildID = {
  1063.         GuiButton("off") {
  1064.           X = 0;
  1065.           Y = 0;
  1066.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  1067.         },  
  1068.         GuiButton("on") {
  1069.           X = 0;
  1070.           Y = 0;
  1071.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  1072.         }
  1073.       };
  1074.     },
  1075.      
  1076.     GuiTextInput("com12_label") {
  1077.       X = 180;
  1078.       Y = 395;
  1079.       Width = 160;
  1080.       Height = 20;
  1081.       InputDisabled = TRUE;  
  1082.       InputVerticalPadding = 0;
  1083.       InputHorizontalPadding = 0;
  1084.       InputTextHeightAdjust = 0;
  1085.       InputTextWidthAdjust = 0;
  1086.       FontID = "font/verdana_black_bold_12.tf";
  1087.     },  
  1088.  
  1089.     GuiButtonGroup("com13_button") {
  1090.       X = 160;
  1091.       Y = 415;
  1092.       RadioGroupID = 1;
  1093.       Hidden = TRUE;
  1094.       ScriptID = script {
  1095.         @activate {
  1096.           ResPropSetStr(GuiSiblingByName("commodity_drawer"),"cur_commodity",ResPropGetStr(GuiSiblingByName("com13_label"),"InputText"));
  1097.         }
  1098.       };         
  1099.       ChildID = {
  1100.         GuiButton("off") {
  1101.           X = 0;
  1102.           Y = 0;
  1103.           UpID = "gui/laptop/map_button/small_check_off.pcx";
  1104.         },  
  1105.         GuiButton("on") {
  1106.           X = 0;
  1107.           Y = 0;
  1108.           UpID = "gui/laptop/map_button/small_check_on_red.pcx";
  1109.         }
  1110.       };
  1111.     },
  1112.      
  1113.     GuiTextInput("com13_label") {
  1114.       X = 180;
  1115.       Y = 415;
  1116.       Width = 160;
  1117.       Height = 20;
  1118.       InputDisabled = TRUE;  
  1119.       InputVerticalPadding = 0;
  1120.       InputHorizontalPadding = 0;
  1121.       InputTextHeightAdjust = 0;
  1122.       InputTextWidthAdjust = 0;
  1123.       FontID = "font/verdana_black_bold_12.tf";
  1124.     }
  1125.   };  
  1126. }
  1127.